#ifndef GENERICSERVICE_H
#define GENERICSERVICE_H

#include "service.h"

class GenericService: public QObject
{
    Q_OBJECT

public:
    GenericService(QString url="", QObject *parent = 0);
    void setUrl(QString url);
    void get(Service *service, QString args = "");
    void post(Service *service, QString data);

signals:
    void responseReceived(const QByteArray &data);
    void networkError(QNetworkReply::NetworkError err);

public slots:
    void serviceResponseReceived(const QByteArray &data);
    void serviceNetworkError(QNetworkReply::NetworkError err);

private:
    QString mUrl;
};

#endif // GENERICSERVICE_H
